<%= header %>
<!--
	This test checks that a error reported and re-thrown in an event handler isn't
	re-sent by the global error handler
-->
<%= boomerangScriptMin %>
<script src="38-events-xhr-reported.js" type="text/javascript"></script>
<script>
BOOMR_test.init({
	testAfterOnBeacon: true,
	Errors: {
		enabled: true,
		monitorEvents: true,
		monitorGlobal: true
	}
});

if (window.XMLHttpRequest) {
	var xhr = new window.XMLHttpRequest();
	xhr.open("GET", "/404");

	if (xhr.addEventListener) {
		xhr.addEventListener("load", function errorFunction() {
			// will throw an error
			a.foo = false;
		});
	}

	xhr.send(null);
}
</script>
<!-- delay the page by 1second so an error can fire -->
<img src="/delay?delay=1000&amp;file=/assets/img.jpg" style="width: 100px" />
<%= footer %>
